<!DOCTYPE html>
<!-- saved from url=(0037)http://c.tsz90.com/home/task/task_all -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>任务大厅</title>

<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/swiper.css">
<link href="__PUBLIC__/static/css/renwu/owl.carousel.css" rel="stylesheet">
<link href="__PUBLIC__/static/css/renwu/owl.theme.css" rel="stylesheet">
<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/style.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/css/renwu/selectFilter.css">

</head>
<body>
<!-- 搜索 -->
<div class="search_bar">
	<div class="container">
		<form action="http://c.tsz90.com/home/task/task_all.html">
			<input type="hidden" name="search_type" value="0">
            <input type="hidden" name="page" value="1">
			<div class="back_icon">
				<a href="http://c.tsz90.com/home/task/task_all#"><img src="__PUBLIC__/static/upload/renwu/icon_back.png" alt=""></a>
			</div>
			<div class="select_box">	
					<!-- 搜索框 -->
					<div class="filter-box select_b">
						<div class="filter-text">
							<input class="filter-title" type="text" readonly="" value="任务ID">
							<img src="__PUBLIC__/static/upload/renwu/icon_down.png" alt="">
						</div>
						<select name="filter" style="display: none;">
							<option value="0">任务ID</option>
							<option value="1">商家ID</option>
							<option value="2">项目名</option>
							<option value="3">关键词</option>
						</select>
					<ul class="filter-list"><li data-value="0"><a title="任务ID">任务ID</a></li><li data-value="1"><a title="商家ID">商家ID</a></li><li data-value="2"><a title="项目名">项目名</a></li><li data-value="3"><a title="关键词">关键词</a></li></ul></div>
			</div>
			<div class="left">
				<button type="submit"><img src="__PUBLIC__/static/upload/renwu/icon_search.png" alt=""></button>
				<input type="text" placeholder="搜索任务" name="keyword">
			</div>
			<div class="right">
				<a href="reward">
					<img src="__PUBLIC__/static/upload/renwu/icon_fabu.png" alt="">
					<p>发布悬赏</p>
				</a>
			</div>
		</form>
	</div>
</div>
<div class="shoplist">
	<!-- <div class="zhiding">
		<a href="#">
			<img src="/static/home/mobile/images/icon_up.png" alt="">
			置顶店铺
		</a>
	</div> -->
	<div class="listbox">
		<div id="owl-demo" class="owl-carousel owl-theme" style="display: block; opacity: 1;">
						<div class="owl-wrapper-outer"><div class="owl-wrapper" style="width: 1830px; left: 0px; display: block;"><div class="owl-item" style="width: 305px;"><div class="items">
				<span>
					<img src="__PUBLIC__/static/upload/renwu/15be5911c10d12bbeefbe7b7b4ef15c4.png" alt="" onerror="this.src=&#39;/static/home/mobile/picture/user.png&#39;">
				</span>
				
										<a onclick="delFollow(&#39;3483&#39;);" id="yiguanzhu3483" class="btn_blue" style="color:#fff;">已关注</a>
									
				<img class="top_pic" src="__PUBLIC__/static/upload/renwu/shop_top.png" alt="">
			</div></div><div class="owl-item" style="width: 305px;"><div class="items">
				<span>
					<img src="__PUBLIC__/static/upload/renwu/15be5911c10d12bbeefbe7b7b4ef15c4.png" alt="" onerror="this.src=&#39;/static/home/mobile/picture/user.png&#39;">
				</span>
				
										<a onclick="delFollow(&#39;3484&#39;);" id="yiguanzhu3484" class="btn_blue" style="color:#fff;">已关注</a>
									
				<img class="top_pic" src="__PUBLIC__/static/upload/renwu/shop_top.png" alt="">
			</div></div><div class="owl-item" style="width: 305px;"><div class="items">
				<span>
					<img src="__PUBLIC__/static/upload/renwu/bc8dfa510c633be03be2a1d930432bc2.png" alt="" onerror="this.src=&#39;/static/home/mobile/picture/user.png&#39;">
				</span>
				
										<a onclick="followUser(&#39;3485&#39;);" id="guanzhudianpu3485" class="btn_blue" style="color:#fff;">关注店铺</a>
									
				<img class="top_pic" src="__PUBLIC__/static/upload/renwu/shop_top.png" alt="">
			</div></div></div></div>
						
						
			
		
		</div>
	</div>
</div>
<!-- 任务分类 -->
<div class="task_type">
	<div class="container">
		<div class="row02">
			<div class="col-md-2">
				<a href="javascript:;" class="aa" data-type="全部">
					<img src="__PUBLIC__/static/upload/renwu/type03.png" alt="">
					<!-- 搜索框 -->
					<div class="filter-box select_a">
						<div class="filter-text">
							<input class="filter-title" id="filter-title" type="text" readonly="" value="全部" style="width:50px;">
							<img src="__PUBLIC__/static/upload/renwu/st.png" alt="">
						</div>
						<select name="filter" style="display: none;">
							<?php foreach ($str as $key => $v): ?>
								<option value="<?php echo $key ?>"><?php echo $v['type'] ?></option>
							<?php endforeach ?>
						</select></div>
				</a>
			</div>
			<div class="col-md-2">
				<a href="javascript:;" class="aa" data-type="1">
					<img src="__PUBLIC__/static/upload/renwu/type01.png" alt="">
					<p>精选</p>
				</a>
			</div>
			<div class="col-md-2"> 
				<a href="javascript:;" class="aa" data-type="2">
					<img src="__PUBLIC__/static/upload/renwu/type02.png" alt="">
					<p>最新</p>
				</a>
			</div>
			<div class="col-md-2">
				<a href="javascript:;" class="aa" data-type="3">
					<img src="__PUBLIC__/static/upload/renwu/type04.png" alt="">
					<p>高价</p>
				</a>
			</div>
			<div class="col-md-2">
				<a href="javascript:;" class="aa" data-type="4">
					<img src="__PUBLIC__/static/upload/renwu/type05.png" alt="">
					<p>简单</p>
				</a>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</div>
<script src="__PUBLIC__/static/js/renwu/jquery.min.js"></script>
<script>
	$('.aa').click(function(){
		var type=$(this).attr('data-type');
		// alert(type);
		$.ajax({
			url:'shows',
			data:{
				type:type
			},
			success:function(e){
				var json=JSON.parse(e);
				console.log(json);
				var str='';
				var res=json.res;
				$(res).each(function(k,v){
						str+='<div class="pic">';
							str+='<a href="" data-id="'+v.id+'" id="aa">';
							str+='<img src="'+v.img+'" alt="" onerror="this.src=&#39;/static/home/mobile/picture/user.png&#39;">';
							str+='</a>';
							str+='</div>';
							str+='<div class="text">';
							str+='<h3><a href="" id="aa" data-id="'+v.id+'">'+v.title+'<span class="right">赏'+v.money+'元</span></a></h3>';
							str+='<p class="ts"><a href="" id="aa" data-id="'+v.id+'">'+v.count+'人已赚，剩余'+v.remaining+'个	<!-- <span class="right">5~10算力<img src="/static/home/mobile/images/icon01.png" alt=""></span> --></a></p>';
							str+='<div class="bottom_btns">';
							str+='<a href="" id="aa" class="btn" data-id="'+v.id+'">'+v.type+'</a>';
							str+='<a href="" id="aa" class="btn btn2" data-id="'+v.id+'">'+v.name2+'</a>';
							str+='<span class="right"></span>';
							str+='</div>';
							str+='</div>';
					});
				$('.task_items').html(str);
			}
		})
	})
    $(document).on('click','#aa',function(){
    	// alert(11);
    	var id=$(this).attr('data-id');
    	// alert(id);
    	$.ajax({
    		url:'show',
    		data:{
    			id:id
    		},
            success:function(e){
            	// console.log(e);
            	// alert(111);
            	var json=JSON.parse(e);
            	var id=json.id;
            	// localStorage.setItem('id',json.id);
            	location.href="http://www.tp.com/thinkphp5/public/index.php/index/renwu/bounty?id="+id;

            }
    	})
    })
</script>
<div class="optimum_task" id="table">
<!-- 	<div class="title_select">
		<a href="#">
			<span>类型</span>
		</a>
		<a href="#" class="active">
			<span>综合</span>
		</a>
	</div> -->
	<div class="container" id="flow">

				<div class="task_items">
					<?php foreach ($res as $key => $value): ?>
			<div class="pic">
				<a href="" data-id="<?php echo $value['id'] ?>" id="aa">
					<img src="<?php echo $value['img'] ?>" alt="" onerror="this.src=&#39;/static/home/mobile/picture/user.png&#39;">
				</a>
			</div>
			<div class="text">
				<h3><a href="" id="aa" data-id="<?php echo $value['id'] ?>"><?php echo $value['title'] ?><span class="right">赏<?php echo $value['money'] ?>元</span></a></h3>
				<p class="ts"><a href="" id="aa" data-id="<?php echo $value['id'] ?>"><?php echo $value['count'] ?>人已赚，剩余<?php echo $value['remaining'] ?>个	<!-- <span class="right">5~10算力<img src="/static/home/mobile/images/icon01.png" alt=""></span> --></a></p>
				<div class="bottom_btns">
					<a href="" id="aa" class="btn" data-id="<?php echo $value['id'] ?>"><?php echo $value['type'] ?></a>
					<a href="" id="aa" class="btn btn2" data-id="<?php echo $value['id'] ?>"><?php echo $value['name2'] ?></a>
					<span class="right"></span>
				</div>
			</div>
			<?php endforeach ?>	
		</div>
			
<div class="layui-flow-more">没有更多了</div></div>
<!-- 底部 -->

<script src="__PUBLIC__/static/js/renwu/jquery.min.js"></script>
 <script src="__PUBLIC__/static/js/renwu/owl.carousel.js"></script>
  <script src="__PUBLIC__/static/js/renwu/index.js"></script>
  <script type="text/javascript" src="__PUBLIC__/static/js/renwu/selectFilter.js"></script>
<script>
	$(function() {
	    $('#owl-demo').owlCarousel();
	});
</script>



<script>
	
	
	$(function(){
		// 选项卡切换
		// var $tab_li = $('.row02 a');
		// $tab_li.click(function(){
		// 	var type = $(this).attr('data-type');
		// 	if(type!=0){
		// 	var newurl = updateQueryStringParameter(window.location.href, 'order',type);
		// 	window.location.href=newurl;
		// 	}
		// 	$(this).addClass('active').siblings().removeClass('active');
		// });


		// 模拟selelct js
		//这里是初始化
		$('.select_a').selectFilter({
			callBack : function (val){
				var id=val;
				// alert(id);
				$.ajax({
					url:'renwu',
					data:{
						id:id
					},
					success:function(e){
						// console.log(e);
						var json=JSON.parse(e);
						// console.log(json);
						var res=json.res;
						var str='';
						var sss='';
						$(res).each(function(k,v){
							str='<input class="filter-title" id="filter-title" type="text" readonly="" value="'+v.type+'" style="width:50px;">';
							sss+='<div class="pic">';
							sss+='<a href="" data-id="'+v.id+'" id="aa">';
							sss+='<img src="'+v.img+'" alt="" onerror="this.src=&#39;/static/home/mobile/picture/user.png&#39;">';
							sss+='</a>';
							sss+='</div>';
							sss+='<div class="text">';
							sss+='<h3><a href="" id="aa" data-id="'+v.id+'">'+v.title+'<span class="right">赏'+v.money+'元</span></a></h3>';
							sss+='<p class="ts"><a href="" id="aa" data-id="'+v.id+'">'+v.count+'人已赚，剩余'+v.remaining+'个	<!-- <span class="right">5~10算力<img src="/static/home/mobile/images/icon01.png" alt=""></span> --></a></p>';
							sss+='<div class="bottom_btns">';
							sss+='<a href="" id="aa" class="btn" data-id="'+v.id+'">'+v.type+'</a>';
							sss+='<a href="" id="aa" class="btn btn2" data-id="'+v.id+'">'+v.name2+'</a>';
							sss+='<span class="right"></span>';
							sss+='</div>';
							sss+='</div>';
						});
						$('#filter-title').replaceWith(str);
						$('.task_items').html(sss);
					}
				})
			}
		});

		// 模拟selelct js
		//这里是初始化
		$('.select_b').selectFilter({
			callBack : function (val){
				//返回选择的值
				$("input[name='search_type']").val(val);
				console.log(val+'-是返回的值')
			}
		});



	})

	function updateQueryStringParameter(uri, key, value) {
	if(!value) {
		return uri;
	}
	var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
	var separator = uri.indexOf('?') !== -1 ? "&" : "?";
	if (uri.match(re)) {
		return uri.replace(re, '$1' + key + "=" + value + '$2');
	}
	else {
		return uri + separator + key + "=" + value;
	}
	}

</script>
<!-- 弹出层 -->
<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/dialog.css">
<script src="__PUBLIC__/static/js/renwu/dialog.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/renwu/global.js"></script>

<script type="text/javascript">
        function followUser(user_id){
          
            Common.loading.show();
            $.post('/home/fans/followUser.html', { user_id: user_id }, function(res) {
                message(res.message,res.redirect,res.type);
				if(res.type=="success"){
				var dianpu="guanzhudianpu"+user_id;
				document.getElementById(dianpu).innerHTML = "已关注";
				}
                Common.loading.hide();
            });     
        }

        function delFollow(user_id){
           
            Common.loading.show();
            $.post('/home/fans/unFollowUser.html', { user_id: user_id }, function(res) {
                message(res.message,res.redirect,res.type);
				if(res.type=="success"){
				var dianpu="yiguanzhu"+user_id;
				document.getElementById(dianpu).innerHTML = "关注店铺";
				}
                Common.loading.hide();
            });     
        }
        </script>

<footer>
	<div class="container">
		 <ul>
		 	<li>
		 		<a href="{:url('user/index')}">
		 			<img src="__PUBLIC__/static/upload/renwu/footer01_off.png" alt="">
		 			<p>首页</p>
		 		</a>
		 	</li>
		 	<li class="active">
		 		<a href="{:url('renwu/index')}">
		 			<img src="__PUBLIC__/static/upload/renwu/footer02_on.png" alt="">
		 			<p>任务大厅</p>
		 		</a>
		 	</li>
		 	<li>
		 		<a href="http://fanli.houtianbest.cn/index.php/m">
		 			<img src="__PUBLIC__/static/upload/renwu/footer03_off.png" alt="">
		 			<p>商城</p>
		 		</a>
		 	</li>
		 	<li>
		 		<a href="{:url('user/user')}">
		 			<img src="__PUBLIC__/static/upload/renwu/footer04_off.png" alt="">
		 			<p>我的</p>
		 		</a>
		 	</li>
		 </ul>
	</div>
</footer>

<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/style(1).css">


<script type="text/javascript" src="__PUBLIC__/static/js/renwu/layui.js"></script>
<script type="text/javascript">
$(function(){
        //流加载

        layui.use('flow', function(){
            var flow = layui.flow;
            flow.load({
                    elem: '#table'
                    ,done: function(page, next){
							if(page==1){
							page=2;
							}else{
							page+=1;
							}
                            var lis = [];
                            $.get('/home/task/index?category_id=0&page='+page, function(res){
                                layui.each(res.data, function(index, item){
                                    $("#flow").append('<div class="task_items"><div class="pic"><a href="/home/task/detail/id/'+item.id+'.html"><img src='+item.thumb+' alt=""></a></div><div class="text"><h3><a href="/home/task/detail/id/'+item.id+'.html">'+item.title+'<span class="right">赏'+item.unit_price+'元</span></a></h3><p class="ts"><a href="/home/task/detail/id/'+item.id+'.html">'+item.join_num+'人已赚，剩余'+item.shengyu+'个<span class="right">5~10算力<img src="/static/home/mobile/images/icon01.png" alt=""></span></a></p><div class="bottom_btns"><a href="/home/task/detail/id/'+item.id+'.html" class="btn">'+item.category_name+'</a><a href="/home/task/detail/id/'+item.id+'.html" class="btn btn2">'+item.pro_name+'</a><span class="right"><img src="/static/home/mobile/images/icon02.png" alt=""><img src="/static/home/mobile/images/icon03.png" alt=""></span></div></div></div>');
                                });
                                //next(lis.join(''), res.data.length < 0 ? true : false);
								//alert(1);
								next(lis.join(''), page < 1-1); 
                            });
                    }
            });
        });
});
</script>


<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/layui.css">
		
 </body></html>